<template>
	<PullRefresh ref="pullRefresh" :on-refresh="onRefresh">
		<ul>
			<li v-for="i in 100">{{i}}</li>
		</ul>
	</PullRefresh>
</template>

<script>
    import {ref} from 'vue'
    import PullRefresh from "../components/common/pull-refresh";

    export default {
        name: "Test",
        components: {PullRefresh},
        setup() {
            const pullRefresh = ref()
            const onRefresh = () => {
                console.log('mescroll----->down')
                setTimeout(() => {
                    pullRefresh.value.refreshSuccess()
                }, 2000)
            }
            return {
                pullRefresh,
                onRefresh
            }
        }
    }
</script>

<style scoped>
	li {
		height: 50px;
		width: 100%;
		color: #333;
		border-bottom: 1px solid #eee;
	}

</style>
